package com.hz.ruoyiequipment.equipment.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hz.ruoyiequipment.data.domain.AgrEquipment;
import com.hz.ruoyiequipment.equipment.domain.AgrEquipmentFertigation;
import com.hz.ruoyiequipment.equipment.domain.AgrEquipmentSf;
import com.hz.ruoyiequipment.equipment.domain.AgrFertigationData;
import com.hz.ruoyiequipment.equipment.domain.vo.WafEquipment;
import com.ruoyi.common.core.web.domain.AjaxResult;

import java.util.List;


/**
 * @author pan
 * @date 2025/3/8 17:27
 * @description: 水肥一体机服务
 * @version: 1.0
 */
public interface WafEquipmentService extends IService<WafEquipment> {


    AjaxResult getWafEquipment(Integer equipmentStatus, String equipmentCode, String plotsName);

    AjaxResult getWafDetail(Long equipmentId);

    /**
     * @return:
     * @Author: xqd
     * @Date: 2025/3/10 14:10
     * @Description: 新增水肥设备到水肥设备表
     */
    AjaxResult insertWafEquipment(AgrEquipment agrEquipment, AgrEquipmentSf agrEquipmentSf);

    /**
     * @return:
     * @Author: xqd
     * @Date: 2025/3/10 14:48
     * @Description:  修改水肥设备数据
     */
    AjaxResult updateWafEquipment(WafEquipment wafEquipment, List<Integer> plotsIdList);

    /**
     * @return:
     * @Author: xqd
     * @Date: 2025/3/10 15:06
     * @Description: 删除水肥设备数据
     */
    AjaxResult delWafEquipmentByEquipmentId(Long equipmentId);

    /**
     * @return:
     * @Author: xqd
     * @Date: 2025/3/13 15:02
     * @Description: 修改水肥机控制信息
     */
    AjaxResult updateAgrEquipmentFertigation(AgrEquipmentFertigation agrEquipmentFertigation);

    AjaxResult getWafEquipmentID(Long equipmentId);

    /**
     * @return:
     * @Author: xqd
     * @Date: 2025/3/13 15:37
     * @Description: 修改水肥设备主泵状态
     */
    AjaxResult updateSfStatus(AgrEquipmentFertigation agrEquipmentFertigation);

    /**
     * @return:
     * @Author: xqd
     * @Date: 2025/3/19 9:13
     * @Description: 查询水肥机历史数据
     */
    List<AgrFertigationData> getAgrFertigationData(Long equipmentId);

    /**
     * @return:
     * @Author: xqd
     * @Date: 2025/3/19 9:13
     * @Description: 获得水肥机控制信息
     */
    AjaxResult getAgrEquipmentFertigation(Long equipmentId);
    public Integer getSfStatusByEquipmentIdInner( Long equipmentId);
}
